package only.my.railgunys.weapon;

import only.my.railgunys.bean.Character;
import only.my.railgunys.bean.Weapon;

/**
 * 决斗之枪
 */
public class Deathmatch extends Weapon {
    public Deathmatch(int refineLevel,int times){
        this.atk = 454.0;
        this.subStatValue = 36.8;
        this.refineLevel = refineLevel;
        this.name = "决斗之枪";
        this.code = 2;
        this.times = times;
    }


    @Override
    public Character subStatEnhance(Character character) {
        character.addCritRate(subStatValue);
        return character;
    }

    @Override
    public Character specialAbility(Character character) {
        int bonus = 16;
        if(this.times < 2){
            bonus = 24;
            character.addDescription("对单");
        }else {
            character.addDescription("对多");
        }
        character.addAtk(bonus*(1+(refineLevel-1)*0.25));
        return character;
    }
}
